﻿using System;
using System.Collections;
using System.Windows.Controls;
using System.Windows;

namespace Charts.Converters
{
	public class DoubleInverseConverter : ConverterBase<DoubleInverseConverter>
	{
		public override object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
		{
			try {

				return - (double)value - System.Convert.ToDouble(parameter);

			} catch (Exception) { return DependencyProperty.UnsetValue; }
		}
	}
}
